Skip to content

Show differential-pair connection warnings in netlist checks - #4042

Open
0hmX wants to merge 4 commits into
mainfrom
agent/show-differential-pair-netlist-warnings
Open

Show differential-pair connection warnings in netlist checks#4042
0hmX wants to merge 4 commits into
mainfrom
agent/show-differential-pair-netlist-warnings

Conversation

@0hmX

@0hmX 0hmX commented Aug 5, 2026

Copy link
Copy Markdown

Follow-up to tscircuit/core#3011 and its wording refinement in tscircuit/core#3017.

What changed

  • Classify source_property_ignored_warning records for positiveConnection and negativeConnection as netlist diagnostics.
  • Prefer canonical warning type/warning_type metadata over legacy error_type metadata.
  • Print Core's diagnostic message unchanged from tsci check netlist <file>.
  • Preserve the existing resolveInputFilePath and source-generation workflow.
  • Use tscircuit@0.0.2233-libonly, which includes the merged implementation and wording through @tscircuit/core@0.0.1602.

Runtime flow

  1. tsci check netlist <file> resolves the supplied file or the project entrypoint.
  2. The CLI loads the project-local tscircuit, falling back to its bundled dependency.
  3. Core runs SourceDesignRuleChecks and stores the differential-pair diagnostic as a source_property_ignored_warning in Circuit JSON.
  4. The CLI recognizes the positive/negative connection property as a netlist warning and displays Core's message.

For an ambiguous named trace, the diagnostic explains that the trace's connection has more than two terminal pins and lists those pins. It does not recommend removing a connection or changing to a pin selector.

Why

The Circuit JSON record currently uses the generic source_property_ignored_warning type, so category inference alone does not identify it as a netlist diagnostic. The explicit property switch keeps the exception narrow and readable until Circuit JSON has a dedicated differential-pair diagnostic type or category.

Validation

  • 7 focused analyzer and netlist tests passing with 31 assertions
  • Real .tsx Core-to-CLI warning generation using Core 0.0.1602
  • One test per new test file
  • bunx tsc --noEmit
  • Biome checks on changed and new source files
  • git diff --check
  • Iterative reviews for classifier readability, runtime tracing, and final merge resolution

@0hmX
0hmX marked this pull request as ready for review August 5, 2026 11:23
…al-pair-netlist-warnings

# Conflicts:
#	bun.lock
@0hmX 0hmX changed the title Show differential pair warnings in netlist checks Show differential-pair connection warnings in netlist checks Aug 5, 2026

@seveibar seveibar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duuude, wrong repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants